// Five : DbfCdx RDD

#define  MASK  "tutor01.obj"

function XXXX()            // Five is able to start on any function name

   local n

   cGetFile( MASK, "select file" )

   DbUseArea( ,,"test.dbf", "test",.T. )

   MsgInfo( FieldGet( 2 ) )

   MsgInfo( Time() )

   for n = 1 to 10
      MsgInfo( Str( RecNo() ) + ":" + ;
               test->First + "," + test->Last + "," + ;
               test->Street + If( test->Married, ".t.", ".f." ) )
      DbSkip()
   next

   MsgInfo("Going to Bottom")
   DbGoBottom()
   MsgInfo( FieldGet( 2 ) )

   MsgInfo("Now using cdx index.")

   DbSetOrder( "FIRST" )
   MsgInfo ("Change master tag to First")

   MsgInfo("Go Top")
   DbGoTop()
   MsgInfo( FieldGet( 1 ) )

   MsgInfo("Go Bottom")
   DbGoBottom()
   MsgInfo( FieldGet( 1 ) )

   MsgInfo("Skip -1")
   DbSkip(-1)
   MsgInfo( FieldGet( 1 ) )

   MsgInfo("Skip")
   DbSkip()
   MsgInfo( FieldGet( 1 ) )

   DbCloseArea()

return nil

